//-----------------------------------------------------------------------------
//	File: eeprom.c
//	Author: xialing
//		bsp of eeprom using i2c for 24c01/24c02
//-----------------------------------------------------------------------------

#ifndef __EEPROM_H__
#define __EEPROM_H__

#include "stm32f10x.h"
#include "i2c_eeprom.h"

//-----------------------------------------------------------------------------
//	eeprom_write - write data to eeprom
//		@addr: eeprom address
//		@dat: data to be written
//-----------------------------------------------------------------------------
void eeprom_write(uint16_t addr, uint8_t dat);

//-----------------------------------------------------------------------------
//	eeprom_read - read data from eeprom
//		@addr: eeprom address
//		@pdat: data to be read
//-----------------------------------------------------------------------------
void eeprom_read(uint16_t addr, uint8_t *pdat);

#endif
